package com.example.apidocserver.domain.system.entity;

import java.util.Collections;
import java.util.Date;
import java.util.List;

import com.example.apidocserver.infrastructure.base.BaseEntity;
import com.example.apidocserver.infrastructure.constants.SystemConstants;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 系统中所有的枚举(AllEnum)实体类
 *
 * @author makejava
 * @since 2023-02-25 20:02:49
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class AllEnum extends BaseEntity {
    public AllEnum(Integer id, Integer enumType) {
        this.id = id;
        this.enumType = enumType;
        this.enableFlag = SystemConstants.YES;
        AllEnum childrenOne = new AllEnum();
        childrenOne.setEnableFlag(SystemConstants.YES).setChildren(Collections.emptyList());
        this.children = Collections.singletonList(childrenOne);
    }

    private Integer id;
    /**
     * 枚举值
     */
    private Integer enumValue;
    /**
     * 枚举名称
     */
    private String enumName;
    /**
     * 枚举说明
     */
    private String enumDesc;
    /**
     * 枚举分类，分类在改表中有数据
     */
    private Integer enumType;
    /**
     * 是否启用
     */
    private Integer enableFlag;
    /**
     * 排序
     */
    private Integer orderNo;

    private List<AllEnum> children;
}

